//
//  DNDataBase.h
//  DanoneEA
//
//  Created by 3ti_Jery on 16/10/19.
//  Copyright © 2016年 翔傲科技. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <FMDB.h>

@interface DNDataBase : NSObject

@property (nonatomic, retain, readonly) FMDatabaseQueue *dbQueue;

+ (DNDataBase *)shareInstance;

//创建数据库，如果必要时
- (FMDatabase *)createDatabaseIfNeeded;
- (FMDatabaseQueue *)createDatabaseQueue;
- (void)initDBTable;

- (void)clearAllTableData;

- (void)clearDataWithTableName:(NSString *) tableName;

- (NSString *)getQueryAllModelSqlWithTableName:(NSString *) tableName andBeforeDays:(int)days;

- (NSString *)getQueryAppDisplayModelSqlWithTableName:(NSString *) tableName;

- (NSMutableArray *)getAllObjectModelNotSynchronized;

- (NSMutableArray *)getAppDisplayObjectModel;

- (NSString *)convertToJsonStringWithObject:(id)value;



@end
